import sys;
import re;

from fnmatch import fnmatch;

if __name__ == '__main__':
    if len(sys.argv) < 2:
        print "Usage: extractcods.py <javaloader-dir-file>";
        sys.exit(1);
    
    nCount = 0;
    with open(sys.argv[1], "rt") as fin:
        for line in fin:
            mo = re.search("^(\S+)\s+(\d\.)+\d", line);
            if mo is None:
                continue;
                
            print "%s.cod" % mo.group(1);
            nCount += 1;
    
    # print "%d files are found." % nCount;